using System;
using System.Collections.Generic;
using System.Text;

namespace Barrage.Scene
{
    public class Node:Element
    {
        protected List<Element> elements;

        public Node()
        {
            elements = new List<Element>();
        }



        public void addElement(Element e)
        {
            elements.Add(e);
        }

        public override void Render()
        {
            foreach (Element e in elements)
                e.Render();
            NLog.LogManager.GetLogger("Barrage::Node").Debug("Node Rendered");
        }
        public override void Update()
        {
            foreach (Element e in elements)
            {
                e.Motion.Parent = this.motion;
                e.Update();
            }
            NLog.LogManager.GetLogger("Barrage::Node").Debug("Node Updated");
        }
    }
}
